//
//  controllerWithTab.h			
//	abstract class, used for keeping current tab for group of windows;
//  ElektroM
//
//  Created by Michael on 09.10.09.
//  Copyright 2009 Artgruppe inc. All rights reserved.
//

#import <UIKit/UIKit.h>

#define CountOfDirections				11

@interface controllerWithTab : UIViewController {	
	// global tab bar.. 
	IBOutlet UITabBarController* tabBarController;
	
	NSInteger _nCurrentTab;							//! contains current selected tab
	
	controllerWithTab* master;
	// values for DBs (they'll identify the railways controller either):
	NSMutableArray* _directions;
	NSInteger* _uStations;
	
	//values to be saved:
	NSInteger* anStationsStart;
	NSInteger* anStationsEnd;
	
	bool _bUndergroundUpperToolbarShown;
}

@property (nonatomic,retain) IBOutlet UITabBarController* tabBarController;

-(void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item;

// methods for getting into the storage:
-(void)storageSetSelectedStations:(int)whichOne TheStationValue:(int)nStation FromController:(NSString*)sName;
-(NSInteger)storageGetSelectedStations:(int)whichOne FromController:(NSString*)sName;
-(void)starageSetPointersStatStart:(NSInteger*)StationsStart withStationsEnd:(NSInteger*)StationsEnd withUStations:(NSInteger*)UStations;
-(void)initStorage;
-(void)writeStorage;
-(void)readStorage;
-(void)releaseStorage;
-(NSString *)dataFilePath;

// for accessing storage members:
-(void) setMaster:(controllerWithTab*)yourMaster;
-(void) setGraph:(void*) p;
-(void*) getGraph;

@end
